/** ***********************************************************************************
* @file         sys_err_list.c
* @brief        定义 系统故障打印信息列表
* @details      主要是用来描述系统在运行过程中出现的故障信息，进行统一格式的编码；
* @author       杨小珛
* @date         2021/06/22
* @copyright    北京高知科技有限公司    
* @version      V1.0
* @attention    无
**************************************************************************************/

#include "sys_err_list.h"


/****************************定义系统故障信息列表日志************************************/
static const char sys_err_list[SYS_ERR_LIST_NUM][SYS_ERR_LOG_LEN]=
{
	{"ERRID:0000"}, /* 保留 0000 不使用，便于程序进行判断数据的真假*/
	{"ERRID:0001"}, /*mon_task.c，检测任务运行状态异常；Task running abnormal system needs to be reset */
	{"ERRID:0002"}, /*mon_task.c，检测系统定时器运行状态异常；System timer is running abnormally*/
	{"ERRID:0003"}, /*mon_task.c，检测系统动态申请空间状态异常；System Amount of memory allocated out of safe range*/
	{"ERRID:0004"}, /*mon_task.c，检测系统持续运行7天，系统复位；System runs continuously for 7*24 hours*/
	{"ERRID:0005"}, /*save_task.c，数据存储管理打开失败；Save data management open failure handle num*/
	{"ERRID:0006"}, /*save_task.c，数据存储管理队列已满；Save data queue is full*/
	{"ERRID:0007"}, /*save_task.c，数据存储管理数据读取失败；Save data management read data error,handle is*/
	{"ERRID:0008"}, /*save_task.c，数据存储管理RAM写入失败；Save data management writer ram error,handle is*/
	{"ERRID:0009"}, /*save_task.c，数据存储管理FLASH写入失败；Save data management writer flash error,handle is*/
	{"ERRID:0010"}, /*net_port.c，网络端口动态分配数据失败；Dynamic allocation of application space failed*/
	{"ERRID:0011"}, /*net_port.c，网络端口消息队列已满；Net run port queue is full*/
	{"ERRID:0012"}, /*net_task.c，网络数据发送消息队列已满；Net send data queue queue is full*/
	{"ERRID:0013"}, /*gnss_task.c，GNSS模块定位数据解析失败，重新启动；GNSS module positioning failure,restart power*/
	{"ERRID:0014"}, /*gnss_task.c，GNSS模块定位失败，重新启动；GNSS module has no positioning data,restart power*/
	{"ERRID:0015"}, /*gnss_task.c，GNSS模块串口数据异常，重新启动；module failure,restart power*/
	{"ERRID:0016"}, /*event_task.c，网络异常3分钟后车辆速度为0时，重新启动系统；Network abnormal time timeout, system reset*/
	{"ERRID:0017"}, /*ble_task.c，蓝牙服务打开失败；BLE service configuration failed*/
	{"ERRID:0018"}, /*gsen_task.c，GSEN硬件初始化失败；GSEN register registration failed*/
	{"ERRID:0019"}, /*usb_task.c，USB接收数据动态分配内存失败；Dynamic allocation of application space failed*/
	{"ERRID:0020"}, /*usb_task.c，USB接收消息队列已满；USB data recv queue is full*/
	{"ERRID:0021"}, /*agnss_task.c，获取服务器数据失败；AGNSS server data read failed*/
	{"ERRID:0022"}, /*event_task.c，SIM卡异常10秒钟后，重新启动系统；SIM card abnormal time timeout, system reset*/
	{"ERRID:0023"}, 
	{"ERRID:0024"}, 
	{"ERRID:0025"}, 
	{"ERRID:0026"}, 
	{"ERRID:0027"}, 
	{"ERRID:0028"}, 
	{"ERRID:0029"}, 
	{"ERRID:0030"},{"ERRID:0031"}, {"ERRID:0032"}, {"ERRID:0033"}, {"ERRID:0034"}, {"ERRID:0035"}, {"ERRID:0036"}, {"ERRID:0037"}, {"ERRID:0038"}, {"ERRID:0039"}, 
	{"ERRID:0040"},{"ERRID:0041"}, {"ERRID:0042"}, {"ERRID:0043"}, {"ERRID:0044"}, {"ERRID:0045"}, {"ERRID:0046"}, {"ERRID:0047"}, {"ERRID:0048"}, {"ERRID:0049"}, 
	{"ERRID:0050"},
	{"ERRID:0051"}, 
	{"ERRID:0052"}, 
	{"ERRID:0053"}, 
	{"ERRID:0054"}, 
	{"ERRID:0055"}, 
	{"ERRID:0056"}, 
	{"ERRID:0057"}, 
	{"ERRID:0058"}, 
	{"ERRID:0059"}, 
	{"ERRID:0060"},{"ERRID:0061"}, {"ERRID:0062"}, {"ERRID:0063"}, {"ERRID:0064"}, {"ERRID:0065"}, {"ERRID:0066"}, {"ERRID:0067"}, {"ERRID:0068"}, {"ERRID:0069"}, 
	{"ERRID:0070"},{"ERRID:0071"}, {"ERRID:0072"}, {"ERRID:0073"}, {"ERRID:0074"}, {"ERRID:0075"}, {"ERRID:0076"}, {"ERRID:0077"}, {"ERRID:0078"}, {"ERRID:0079"}, 
	{"ERRID:0080"},{"ERRID:0081"}, {"ERRID:0082"}, {"ERRID:0083"}, {"ERRID:0084"}, {"ERRID:0085"}, {"ERRID:0086"}, {"ERRID:0087"}, {"ERRID:0088"}, {"ERRID:0089"}, 
	{"ERRID:0090"},{"ERRID:0091"}, {"ERRID:0092"}, {"ERRID:0093"}, {"ERRID:0094"}, {"ERRID:0095"}, {"ERRID:0096"}, {"ERRID:0097"}, {"ERRID:0098"}, {"ERRID:0099"}, 
};

/** ****************************************************************************
* @remarks       const char * sys_err_infor_pointer_get( uint32_t pos )
* @brief         获取系统错误日志打印信息指针
* @param[in]     err 错误代码
* @param[out]    无
* @return        返回错误日志信息指针，错误时为NULL。
* @attention     无
*******************************************************************************/
const char *sys_err_infor_pointer_get( uint32_t err )
{   
    if( err >= SYS_ERR_LIST_NUM )
    {
        return NULL;
    }
    else
    {
        return sys_err_list[err];
    }
}

